home *** CD-ROM | disk | FTP | other *** search
- Path: keats.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.c,comp.lang.c++
- Subject: Re: [Q] Any utility to attack misuse of comment /* */
- Date: 21 Apr 1996 07:16:25 -0700
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4ldfvpINNi3r@keats.ugrad.cs.ubc.ca>
- References: <4l32et$bhm@sun.rhbnc.ac.uk> <Dq0txr.3px@iquest.net>
- NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
-
- In article <Dq0txr.3px@iquest.net>, Doug Miller <dlmiller@iquest.net> wrote:
- >> My question is, is there any free utility available to attack
- >>
- >
- >Don't know about utilities to detect/correct this, but how about a method to avoid it?
-
- How about gcc -Wall... the pre-processor will warn about /* found within a
- comment.
-
- >When "commenting out" lines from a program, instead of using comments use
- >the preprocessor:
- >
- >#if 0
- > (program lines to be "commented out")
- > . . .
- >#endif
-
- Here is what Eric S. Raymond's Hacker's Dictionary has to say;
-
- _comment out_ vt. To surround a section of code with comment
- delimiters or to prefix every line in the section with a comment
- marker; this preventrs it from being compiled or interpreted.
- Often done when the code is redundant or obsolete, but is being
- left in the source to make the intent of the active code
- clearer; also when the code in that section is broken and yuou
- want to bypass it in order to debug some other part of the code.
- Compare _condition out_, usually the preferred technique in
- languages (such as C) that make it possible.
-
- _condition out_ vt. To prevent a section of code from being
- compiled by surrounding it witha conditional-compilation
- directive whose conditionis always false. The _canonical_
- examples of this directives are #if 0 (or #ifdef notdef), though
- some find the latter _bletcherous_) and #endif in C. Compare
- _comment out_.
-
-